public class Pattern_132 {
    public static boolean find132pattern(int[] nums) {
        for (int i=0;i<nums.length-2;i++){
            if (is132(nums[0],nums[1],nums[2])){
                return true;
            }
        }
        return false;

    }

    public static boolean is132(int num1,int num2,int num3){
        if (num1<num3&&num2>num3)
            return true;
        return false;

    }

    public static void main(String[] args) {
        int[] nums = {3,5,0,3,4};
        find132pattern(nums);
    }
}
